<template>
  <layout>
    <!-- Page Header -->
    <header class="masthead" style="background-image: url('img/home-bg.jpg')">
      <div class="overlay"></div>
      <div class="container">
        <div class="row">
          <div class="col-lg-8 col-md-10 mx-auto">
            <div class="site-heading">
              <h1>Clean Blog</h1>
              <span class="subheading">A Blog Theme by Start Bootstrap</span>
            </div>
          </div>
        </div>
      </div>
    </header>

    <!-- Main Content -->
    <div class="container">
      <div class="row">
        <div class="col-lg-8 col-md-10 mx-auto">
          <div
            class="post-preview"
            v-for="post in $page.tag.posts"
            :key="post.id"
          >
            <g-link :to="'/post/'+post.id">
              <h2 class="post-title">
                {{ post.title }}
              </h2>
              <!-- <h3 class="post-subtitle">
                {{post.node.content}}
              </h3> -->
            </g-link>
            <p class="post-meta">
              Posted by
              <a href="#">Start Bootstrap</a>
              on {{ post.created_at }}
            </p>
           
            <hr />
          </div>
          <!-- <Pager :info="$page.posts.pageInfo" /> -->

          <hr />
          <!-- Pager -->
          <div class="clearfix">
            <a class="btn btn-primary float-right" href="#"
              >Older Posts &rarr;</a
            >
          </div>
        </div>
      </div>
    </div>
    <!-- Footer -->
  </layout>
</template>
<page-query>
query($id: ID!){
  
    tag:strapiTag(id: $id){
      title
      id
      posts{
        id
        title
        content
      }
   }
}
</page-query>


// query($id: ID!, $page: Int){
  
//     tag:strapiTag(id: $id){
//       title
//       id
//       belongsTo(page: $page) @paginate {
//         edges {
//           node {
//             ... on StrapiPost {
//               id
//               title
//               created_at
//             }
//          }
//        }
//      }
//    }
}
<script>
export default {};
</script>

<style>
</style>